extends Area2D

func _on_body_entered(body: Player):
	if not (body is Player) : return
	if body.isDead:return
	body.isDead=true

	body.sprite.play('death')
	await body.sprite.animation_finished

	body.get_node('CollisionShape2D').queue_free()
	Engine.time_scale = 0.5

	await get_tree().create_timer(0.6).timeout
	Engine.time_scale = 1
	get_tree().reload_current_scene()


